<template>
	<view class="box">
		<view class="item" v-for="(item, index) in indexList" :key="index"
			@click="list(item)">
			<view class="icon">
				<u-icon :name="item.name" :label="item.title" size="24"></u-icon>
			</view>
			<view style="float: right;" v-if="completeInfoState == '2'">
				<u-icon :name="item.icon" :label="item.certified" size="20" label-color="#11d183" color="#11d183" ></u-icon>
			</view>
			<view v-if="completeInfoState != '2'">
				<u-icon :name="item.erricon" :label="item.errcertified" size="20" color="#f06868"
					label-color="#f06868" ></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				completeInfoState: uni.getStorageSync('completeInfoState') || 0,
				indexList: [{
						title: '身份证',
						name: 'calendar',
						icon: 'checkmark-circle-fill',
						certified: '已认证',
						erricon: 'info-circle-fill',
						errcertified: '未认证'
					},
					{
						title: '手机号',
						name: 'phone',
						icon: 'checkmark-circle-fill',
						certified: '已认证',
						erricon: 'info-circle-fill',
						errcertified: '未认证'
					}
				]
			}
		},
		methods: {
		}
	}
</script>

<style lang="scss" scoped>
	@import "~@/styles/index.scss";
	@import "~@/styles/global.scss";
	.box {
		background-color: $pagebgc;
		width: 100%;
		height: 100vh;

		.item {
			@include flexBetween;
			padding: 20rpx 30rpx;
			background-color: #fff;
			border-bottom: #e1e1e1 solid 1rpx;
		}
	}
</style>